package ai.assist.common.enums;

/**
 * 字典对照枚举
 */
public enum DictEnums {

    APPEAL_NATURE("bcFmCla", "诉求性质", 2),

    APPEAL_SOURCE("bcOri", "诉求来源", 2),

    SET_PRO("setPro", "工单性质", 2),

    WF_CNT("wfCnt", "工单类别", 2),

    DEPARTMENT_CATEGORY("pbDKind", "单位类别", 2),

    SYS_AREA("pcArea", "系统地区", 2),

    SYS_SEX("pcSex", "系统性别", 2),

    SEQ_CODE("seqCode", "交办次序", 2),

    SORT_CODE("sortCode", "性质编码", 2),

    DEAL_CODE("dealCode", "处理方式编码", 2),

    SYS_YN("pcYesNo", "系统是否", 2),
    WF_INCR("wfIncr", "工单自增id", 1),
    WF_ID_INCR("wfIdIncr", "工单自增id", 1),

    WF_DEPT_CATEGORY("deptCategory", "部门分类-无数据", 1),

    JN_STREET_INFO("jnStreetInfo", "金牛区街道社区信息-无数据", 1),
    ;

    private String code;

    private String name;

    private Integer level;

    DictEnums(String code, String name, Integer level) {
        this.code = code;
        this.name = name;
        this.level = level;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public Integer getLevel() {
        return level;
    }

    /**
     * 获取字典枚举
     *
     * @param code
     * @return
     */
    public static DictEnums getDict(String code) {
        for (DictEnums dic : DictEnums.values()) {
            if (dic.getCode().equals(code)) {
                return dic;
            }
        }
        return null;
    }

}
